package com.sinaapp.aidaka.server.config;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class ConfigManager {
	
	private static Logger logger;
	
	public static ConfigManager I = new ConfigManager();
	
	private String configPath ;
	
	private ConfigManager() { }
	
	public String getConfigPath() {
		return configPath;
	}
	
	public void init(String configPath) {
		System.out.println("aidaka-server 开始初始化...");
		this.configPath = configPath;
		PropertyConfigurator.configure(configPath + "log4j.properties");
		logger = Logger.getLogger(ConfigManager.class);
		
		System.out.println("aidaka-server 完成初始化.");
		logger.info("aidaka-server 完成初始化.");
	}
}
